CREATE TABLE [dbo].[TCAMAR_NPIN]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[NU_AMAR] [dbo].[TD_VC_008] NOT NULL,
[CO_UNID_CONC] [dbo].[TD_VC_003] NOT NULL,
[FE_AMAR] [dbo].[TD_DT_001] NOT NULL,
[NU_PROC] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TCAMAR_NP__NU_PR__37A5467C] DEFAULT ((0)),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TCAMAR_NP__CO_US__38996AB5] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TCAMAR_NP__FE_US__398D8EEE] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TCAMAR_NP__CO_US__3A81B327] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TCAMAR_NP__FE_US__3B75D760] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TCAMAR_NPIN] ADD CONSTRAINT [PK__TCAMAR_N__DB895B8067352964] PRIMARY KEY CLUSTERED  ([CO_EMPR], [NU_AMAR], [CO_UNID_CONC], [FE_AMAR], [NU_PROC]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TCAMAR_NPIN] ADD CONSTRAINT [FK__TCAMAR_NPIN__725CC34D] FOREIGN KEY ([CO_EMPR], [CO_UNID_CONC], [NU_AMAR], [FE_AMAR]) REFERENCES [dbo].[TCAMAR_NCPR] ([CO_EMPR], [CO_UNID_CONC], [NU_AMAR], [FE_AMAR])
GO
